gtkwidget: Ensure touchpad events trigger the bubbling phase
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 9 Jul 2015 16:48:41 +0000 (18:48 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 12 Aug 2015 21:20:25 +0000 (23:20 +0200)
For all other events, we run the bubble phase deep in the specific
::motion/button-press/release/touch handlers.

For touchpad events, it doesn't make sense to use GtkWidgetClass
slots if the intended way to deal with these are gestures, so we
run the bubble phase directly from gtk_widget_event_internal().

gtk/gtkwidget.c

index 2f3b142352c300d229c935edf5d88fe76a1502fc..4c158b3a71e5aff9b4db4665ab84cf62ad912a60 100644 (file)
@@ -7717,6 +7717,10 @@ gtk_widget_event_internal (GtkWidget *widget,
 
       switch (event->type)
        {
+        case GDK_TOUCHPAD_SWIPE:
+        case GDK_TOUCHPAD_PINCH:
+          return_val |= _gtk_widget_run_controllers (widget, event, GTK_PHASE_BUBBLE);
+          /* Fall through */
        case GDK_EXPOSE:
        case GDK_NOTHING:
          signal_num = -1;